package com.atguigu02.selfdefine.exer1;

import org.junit.Test;

import java.util.ArrayList;
import java.util.List;

/**
 * ClassName: DAOTest
 * Package: com.atguigu02.selfdefine.exer1
 * Description:
 *
 * @Author BuTang
 * @Create 2023/6/10 14:55
 * @Version 1.0
 */
public class DAOTest {
    @Test
    public void test1(){
        DAO d = new DAO<User>();
        d.save("a",new User(1,22,"q"));
        d.save("b",new User(2,32,"s"));

        System.out.println(d.get("a"));
        System.out.println();

        d.update("a",new User(2,32,"s"));
        System.out.println(d.get("a"));
        System.out.println();

        List<DAO> list = d.list();
        System.out.println(list);

        d.delete("a");
         list = d.list();
        System.out.println(list);




    }
}
